#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //增加
    connect(ui->pushButton_add,&QPushButton::clicked,this,[&]()
    {
        float ret = this->windowOpacity();
        ret += 0.1;
        this->setWindowOpacity(ret);
    });
    connect(ui->pushButton_decl,&QPushButton::clicked,this,[&]()
    {
        float ret = this->windowOpacity();
        ret -= 0.1;
        this->setWindowOpacity(ret);
    });
}

Widget::~Widget()
{
    delete ui;
}

